package com.bjyhl.medical.main.video;

import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.View;

import com.bjyhl.core.fragments.bottom.BaseBottomFragment;
import com.bjyhl.core.fragments.bottom.BottomItemFragment;
import com.bjyhl.medical.R;
import com.bjyhl.ui.recycler.ItemType;

/**
 * Created by Natalya on 2019/1/27 18:22
 * Note: 主页fragment
 */

public class VideoFragment extends BottomItemFragment {
    @Override
    public Object setLayout() {
        return R.layout.fragment_videos;
    }

    @Override
    public void onBindView(@Nullable Bundle savedInstanceState, @NonNull View root) {
    }

    @Override
    public void onLazyInitView(@Nullable Bundle savedInstanceState) {
        super.onLazyInitView(savedInstanceState);

        final BaseBottomFragment baseBottomFragment = getParentFragments();
        getSupportDelegate().loadRootFragment(R.id.movie_container, VideoOneTypeFragment.newInstance(ItemType.VIDEO_MOVIE_STR, ItemType.VIDEO_DEFAULT_COUNT, baseBottomFragment));
        getSupportDelegate().loadRootFragment(R.id.dsj_container, VideoOneTypeFragment.newInstance(ItemType.VIDEO_DSJ_STR, ItemType.VIDEO_DEFAULT_COUNT, baseBottomFragment));
        getSupportDelegate().loadRootFragment(R.id.dhp_container, VideoOneTypeFragment.newInstance(ItemType.VIDEO_DHP_STR, ItemType.VIDEO_DEFAULT_COUNT, baseBottomFragment));
        getSupportDelegate().loadRootFragment(R.id.jlp_container, VideoOneTypeFragment.newInstance(ItemType.VIDEO_JLP_STR, ItemType.VIDEO_DEFAULT_COUNT, baseBottomFragment));


//        getSupportDelegate().loadRootFragment(R.id.movie_title_container, VideoTitleFragment.newInstance(ItemType.VIDEO_MOVIE_STR));
//        getSupportDelegate().loadRootFragment(R.id.movie_container, VideoBlockFragment.newInstance(ItemType.VIDEO_MOVIE_STR, ItemType.VIDEO_MOVIE_DEFAULT_COUNT));
//
//        getSupportDelegate().loadRootFragment(R.id.dsj_title_container, VideoTitleFragment.newInstance(ItemType.VIDEO_DSJ_STR));
//        getSupportDelegate().loadRootFragment(R.id.dsj_container, VideoBlockFragment.newInstance(ItemType.VIDEO_DSJ_STR, ItemType.VIDEO_DSJ_DEFAULT_COUNT));
//
//        getSupportDelegate().loadRootFragment(R.id.dhp_title_container, VideoTitleFragment.newInstance(ItemType.VIDEO_DHP_STR));
//        getSupportDelegate().loadRootFragment(R.id.dhp_container, VideoBlockFragment.newInstance(ItemType.VIDEO_DHP_STR, ItemType.VIDEO_DHP_DEFAULT_COUNT));
//
//        getSupportDelegate().loadRootFragment(R.id.jlp_title_container, VideoTitleFragment.newInstance(ItemType.VIDEO_JLP_STR));
//        getSupportDelegate().loadRootFragment(R.id.jlp_container, VideoBlockFragment.newInstance(ItemType.VIDEO_JLP_STR, ItemType.VIDEO_JLP_DEFAULT_COUNT));
    }
}
